package com.demo2do.fms.admin.service.business;

import java.util.List;
import java.util.Map;

import org.springframework.jdbc.core.RowMapper;

import com.demo2do.core.entity.page.Page;
import com.demo2do.core.persistence.support.QueryBuilder;
import com.demo2do.fms.admin.entity.report.business.ConsignorShipmentReportSearch;
import com.demo2do.fms.admin.entity.search.business.ConsignorShipmentSearch;
import com.demo2do.fms.admin.entity.search.business.OutShipmentSearch;
import com.demo2do.fms.entity.business.shipment.ShipmentLine;

/**
 *
 * @author Ark
 *
 */
public interface OutShipmentService {

    /**
     * 外包指令-查询
     * 
     * @param outShipmentSearch
     * @return
     */
    public int count(OutShipmentSearch outShipmentSearch);
    
    /**
     * 外包指令-查询
     * 
     * @param outShipmentSearch
     * @param page
     * @return
     */
    public List<ShipmentLine> search(OutShipmentSearch outShipmentSearch, Page page);
    
    /**
     * 生成外包指令派车
     * 
     * @param loadNumbers
     * @param operator
     */
    public void generate(List<String> loadNumbers, String operator);

    /**
     * 取消外包指令派车
     * 
     * @param loadNumbers
     * @param operator
     */
    public void cancel(List<String> loadNumbers, String operator);
    
    /**
     * 委托方销单 count 
     * 
     * @param consignorOrderSearch
     * @return
     */
    public int countConsignorOrder(ConsignorShipmentSearch consignorOrderSearch);
    
    /**
     * 委托方销单 list 
     * 
     * @param consignorOrderSearch
     * @param page
     * @return
     */
    public List<Map<String, Object>> listConsignorOrder(ConsignorShipmentSearch consignorOrderSearch, Page page);
    
    /**
     * 委托方销单 - 销单
     * 
     * @param financeIds
     * @param userName
     */
    public void dispose(List<Long> financeIds, String userName);
    
    /**
     * @param queryBuilder
     * @param rowMapper
     * @return
     */
    public List<Map<String, Object>> exportAll(QueryBuilder queryBuilder, RowMapper<Map<String, Object>> rowMapper);
    
    /**
     * @param search
     * @param page
     * @return
     */
    public List<Map<String, Object>> search(ConsignorShipmentReportSearch search, Page page);
    
}
